<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <div>{{addr}}</div>
        <!-- number:数字不重新赋值 -->
        年龄<input type="text" v-model.number="age">
        <!-- trim:去左右空格   lazy:失去焦点 延迟更新 -->
        地址<input type="text" v-model.trim.lazy="addr">
        <button @click="addr +='九云'">加</button>

    </div>
    <script src="/js/js/vue.js"></script>
    <script>
        var vm = new Vue({
            el: '#app',
            
            data: {
                age:18,
                addr:'湖南长沙'
            },
            methods: {
            }
        })
    </script>
</body>
</html>
